package com.toe.commodity.webapi.mapper;

import com.toe.pojo.entity.commodity.CommodityGoodsAlbum;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.toe.pojo.vo.commodity.CommodityGoodsAlbumVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */
@Repository
public interface CommodityGoodsAlbumMapper extends BaseMapper<CommodityGoodsAlbum> {

    //根据商品id找到其对应的相册
    List<CommodityGoodsAlbumVO> getGoodsUrlByGoodsId(Long id);

    //插入新的商品图片
    Integer addNewGoodsUrl(CommodityGoodsAlbumVO commodityGoodsAlbumVO);

    //根据图片地址删除图片
    Integer deletedAlbumByUrl(Long id);

}
